<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateAppleBuyLogsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('apple_buy_logs', function (Blueprint $table) {
            $table->increments('id');
            $table->string('app_id')->index();
            $table->string('task_name')->index();
            $table->string('account_email')->index();
            $table->string('device_name')->index();
            $table->string('device_version');
            $table->string('device_type')->index();
            $table->integer('task_status')->index()->default(200);
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('apple_buy_logs');
    }
}
